package br.com.quiz.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


/**
 * The persistent class for the disciplina_professor database table.
 * 
 */
@Entity
@Table(name="disciplina_professor")
@NamedQuery(name="DisciplinaProfessor.listar", query="SELECT d FROM DisciplinaProfessor d")
public class DisciplinaProfessor implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="DIP_ID")
	private int dipId;

	//bi-directional many-to-one association to Disciplina
	@ManyToOne
	@JoinColumn(name="DIP_DIS_ID")
	private Disciplina disciplina;

	//bi-directional many-to-one association to Professor
	@ManyToOne
	@JoinColumn(name="DIP_PRO_ID")
	private Professor professor;

	public DisciplinaProfessor() {
	}

	public int getDipId() {
		return this.dipId;
	}

	public void setDipId(int dipId) {
		this.dipId = dipId;
	}

	public Disciplina getDisciplina() {
		return this.disciplina;
	}

	public void setDisciplina(Disciplina disciplina) {
		this.disciplina = disciplina;
	}

	public Professor getProfessor() {
		return this.professor;
	}

	public void setProfessor(Professor professor) {
		this.professor = professor;
	}

	@Override
	public String toString() {
		return "DisciplinaProfessor [dipId=" + dipId + ", disciplina="
				+ disciplina + ", professor=" + professor + "]";
	}

}